﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Client.ServiceReference1;
using System.ServiceModel;

namespace Client
{
    class Program
    {
        static void Main(string[] args)
        {
            InstanceContext instanceContext = new InstanceContext(new ServiceCallback());
            CaculatorClient client = new CaculatorClient(instanceContext);
            client.RegeDit();
            Console.WriteLine("1+4="+client.Add(1, 4));
            Console.ReadKey();
        }
    }

    public class ServiceCallback : Client.ServiceReference1.ICaculatorCallback
    {
        public ServiceCallback()
        {
        }
        public void ShowMessage(string msg)
        {
            Console.WriteLine("Message from Server:" + msg);
        }
    }
}
